home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2008 February / PCWFEB08.iso / Software / Resources / Developers / XAMPP 1.5.4 / Windows installer / xampp-win32-1.5.4-installer.exe / xampp / cgi-bin / printenv.pl < prev   
Encoding:
Perl Script  |  2006-05-08  |  300 b   |  13 lines

  1. #!"\xampp\perl\bin\perl.exe"
  2. ##
  3. ##  printenv -- demo CGI program which just prints its environment
  4. ##
  5.  
  6. print "Content-type: text/plain; charset=iso-8859-1\n\n";
  7. foreach $var (sort(keys(%ENV))) {
  8.     $val = $ENV{$var};
  9.     $val =~ s|\n|\\n|g;
  10.     $val =~ s|"|\\"|g;
  11.     print "${var}=\"${val}\"\n";
  12. }
  13.